import request from '../../../utils/request'

// 获取物种历史
export function getSpeciesTree(type) {
  return request({
    url: `/cockpitapi/species/huizong/getSpeciesTree?type=${type}`,
    method: 'post'
  })
}
// 获取珍稀物种列表
export function getRareList() {
  return request({
    url: '/cockpitapi/species/huizong/getRareList',
    method: 'post'
  })
}
// 获取物种大类列表
export function getCategoryList(params) {
  return request({
    url: '/cockpitapi/species/huizong/getCategoryList',
    method: 'post',
    data:params
  })
}

// 获取物种小类列表
export function getSubclassList(params) {
  return request({
    url: '/cockpitapi/species/huizong/getSubclassList',
    method: 'post',
    data:params
  })
}

// 获取物种详情列表
export function getDetailList(params) {
  return request({
    url: '/cockpitapi/species/huizong/getDetailList',
    method: 'post',
    data:params
  })
}

// 获取物种定位列表
export function getLocationByCategotyId(params) {
  return request({
    url: '/cockpitapi/species/huizong/getLocationByCategotyId',
    method: 'post',
    data:params
  })
}

// 获取物种列表
export function getSpeciesList(params) {
  return request({
    url: '/species/list',
    method: 'get',
    params
  })
}

// 获取物种详情
export function getSpeciesDetail(id) {
  return request({
    url: `/species/detail/${id}`,
    method: 'get'
  })
}

// 获取物种统计数据
export function getSpeciesStats() {
  return request({
    url: '/species/stats',
    method: 'get'
  })
}

// 获取物种观测数据
export function getSpeciesObservation(params) {
  return request({
    url: '/species/observation',
    method: 'get',
    params
  })
}

// 获取物种统计
export function getStaticBydate(type,startTime, endTime, deviceId) {
  return request({
    url: `/cockpitapi/species/${type}/getStaticBydate?startTime=${startTime}&endTime=${endTime}&deviceId=${deviceId}`,
    method: 'post'
  })
}

// 获取物种统计
export function getStaticByDateAndIds(type,startTime, endTime, deviceIds) {
  return request({
    url: `/cockpitapi/species/${type}/getStaticByDateAndIds?startTime=${startTime}&endTime=${endTime}&deviceIds=${deviceIds}`,
    method: 'post'
  })
}

// 获取设备情况
export function getDeviceStatus(type) {
  return request({
    url: `/cockpitapi/species/${type}/getDeviceStatus`,
    method: 'post'
  })
}

// 获取红外设备列表
export function getDeviceList(type) {
  return request({
    url: `/cockpitapi/species/${type}/getDeviceList`,
    method: 'post'
  })
}

// 获取红外设备对比
export function getContrast(type) {
  return request({
    url: `/cockpitapi/species/${type}/getContrast`,
    method: 'post'
  })
}

// 获取红外设备记录
export function getCollectList10(type,deviceId,spName) {
  return request({
    url: `/cockpitapi/species/${type}/getCollectList?deviceId=${deviceId}&spName=${spName}`,
    method: 'post'
  })
}

// 获取红外设备记录
export function getCollectListByIds(type,deviceIds) {
  return request({
    url: `/cockpitapi/species/${type}/getCollectListByIds?deviceIds=${deviceIds}`,
    method: 'post'
  })
}